use pan123_core::PanClient;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // 1. 初始化 Client
    let client = PanClient::new(
        std::env::var("PAN123_CLIENT_ID").unwrap(),
        std::env::var("PAN123_CLIENT_SECRET").unwrap(),
    );

    let file_path = "D:/下载/摄图网_781200_大气新年卷轴开场片头AE模板(非企业商用).zip";
    let parent_id = 9796127;

    match client.upload(file_path, parent_id, Some(2)).await {
        Ok(resp) => println!("上传成功: {:?}", resp),
        Err(e) => println!("上传失败: {:?}", e),
    }

    Ok(())
}
